using System;
using System.Runtime.Serialization;

namespace InfiniTec.Security
{
    /// <summary>
    /// This <see cref="Exception"/> indicates, that invalid credentials were supplied.
    /// </summary>
    [Serializable]
    public class InvalidCredentialException : Exception
    {
        /// <summary>
        /// Creates a new instance of this class.
        /// </summary>
        public InvalidCredentialException() { }
        /// <summary>
        /// Creates a new instance of this class.
        /// </summary>
        /// <param name="message">The message of the exception</param>
        public InvalidCredentialException(string message) : base(message) { }
        /// <summary>
        /// Creates a new instance of this class.
        /// </summary>
        /// <param name="inner">The message of the exception</param>
        /// <param name="message">The inner exception</param>
        public InvalidCredentialException(string message, Exception inner) : base(message, inner) { }
        /// <summary>
        /// Creates a new instance of this class.
        /// </summary>
        /// <param name="context">A <see cref="SerializationInfo"/> to use.</param>
        /// <param name="info">A <see cref="StreamingContext"/> to use.</param>
        protected InvalidCredentialException(
          SerializationInfo info, StreamingContext context): base(info, context) { }
    }
}
